package com.lsa.letcode.the40.combinationSum2;

import java.util.Arrays;

import org.junit.Assert;
import org.junit.Test;

public class CombinationSum2Test {
	@Test
	public void test() throws Exception {
		Solution s = new Solution();	
		Assert.assertEquals(Arrays.asList(Arrays.asList(1, 1, 2, 3),
				Arrays.asList(1, 1, 5), Arrays.asList(1, 2, 4),
				Arrays.asList(1, 6), Arrays.asList(2, 5), Arrays.asList(3, 4), Arrays.asList(7)),
				s.combinationSum2(new int[] { 1, 1, 2, 3, 4, 5, 6, 7 }, 7));
		
		Assert.assertEquals(Arrays.asList(Arrays.asList(1, 1, 6),
				Arrays.asList(1, 2, 5), Arrays.asList(1, 7),
				Arrays.asList(2, 6)), s.combinationSum2(new int[] { 10, 1, 2,
				7, 6, 1, 5 }, 8));
		
		Assert.assertEquals(Arrays.asList(Arrays.asList(7)), s.combinationSum2(new int[] {7}, 7));

//		System.out.println(s.combinationSum2(new int[] { 1, 1, 2, 3, 4, 5, 6, 7 }, 7));
		//10,1,2,7,6,1,5
//		System.out.println(s.combinationSum2(new int[] { 10, 1, 2, 7, 6, 1, 5 }, 8));
//		System.out.println(s.combinationSum(new int[] { 2, 3, 6, 7 }, 25));
//		System.out.println(s.combinationSum(new int[] { 1, 2, 3 }, 5));
//		System.out.println(s.combinationSum(new int[] { 1 }, 5));
//		System.out.println(s.combinationSum(new int[] { 1, 2, 3 }, 0));
	}
}